#version 450


layout (location = 0) in vec3 InWorldPos;
layout (set=0, binding = 0) uniform PointLightBufferObject
{
  mat4 ProjectView; //光源的投影矩阵和视图矩阵
  vec3 LightPos; //光源的位置
} PointLight;


layout (location = 0) out vec4 OutShadowMap;


//将片段到光源的距离写入片段着色器的输出颜色，也就是shadowMap
void main() 
{
  OutShadowMap.r=distance(PointLight.LightPos,InWorldPos);
}
